﻿<%@ import Namespace="gygac.Modules.DeviceDeploy" %>
<%@ Control Language="C#" Inherits="gygac.Modules.DeviceDeploy.ViewDeviceDeploy" AutoEventWireup="true" CodeBehind="ViewDeviceDeploy.ascx.cs" %>
<asp:GridView ID="grdDeviceDeploy" runat="server" AutoGenerateColumns="False" 
    AllowSorting="True" CellPadding="4" ForeColor="#333333" GridLines="None">
    <RowStyle BackColor="#EFF3FB" />
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
				<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# EditUrl("DDId",DataBinder.Eval(Container.DataItem,"DDId").ToString()) %>'
                        Visible='<%# MyIsEditable(Eval("CreatedByUser")) %>' runat="server">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible='<%# MyIsEditable(Eval("CreatedByUser"))%>' resourcekey="Edit" /></asp:HyperLink>               
    		</ItemTemplate>
        </asp:TemplateField>		
		<asp:BoundField ReadOnly="true" HeaderText="品名" DataField="DeviceName" SortExpression="DeviceName">
        </asp:BoundField >
		<asp:BoundField ReadOnly="true" HeaderText="签收人" DataField="Borrower" SortExpression="Borrower">
        </asp:BoundField >
		<asp:BoundField ReadOnly="true" HeaderText="发放人" DataField="Lender" SortExpression="Lender">
        </asp:BoundField >
		<asp:BoundField ReadOnly="true" HeaderText="借出日期" DataField="LendDate" SortExpression="LendDate" DataFormatString="{0:yyyy-MM-dd}">
        </asp:BoundField >
		<asp:BoundField ReadOnly="true" HeaderText="预计归还日期" DataField="Estimated" SortExpression="Estimated" DataFormatString="{0:yyyy-MM-dd}">
        </asp:BoundField >		
        <asp:TemplateField HeaderText="是否已归还" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="false" >
            <ItemTemplate>
            <asp:Image ID="imgIsReturn" runat="server"  ImageUrl = '<%#GetIsReturnGif(Eval("IsReturned"))  %>'/>
         	</ItemTemplate>
        </asp:TemplateField>        
        <asp:TemplateField HeaderText="归还日期" HeaderStyle-ForeColor="White" HeaderStyle-Font-Bold="false" >
            <ItemTemplate>
            <asp:Label ID="lblReturnDate" runat="server" Text='<%#GetReturnDate(Eval("ReturnDate"))  %>' />
         	</ItemTemplate>
        </asp:TemplateField>	
		
		<asp:BoundField ReadOnly="true" HeaderText="提示邮件地址" DataField="EMail" SortExpression="EMail">            
        </asp:BoundField >		
		<asp:BoundField ReadOnly="true" HeaderText="备注" DataField="Remark" SortExpression="Remark">
        </asp:BoundField >
    </Columns>
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#2461BF" />
    <AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:RadioButton ID="rbViewAll" resourcekey="rbViewAll.Text" runat="server" 
    GroupName="ViewRB" AutoPostBack="True" Checked="True" 
    oncheckedchanged="rbViewAll_CheckedChanged"/>
<asp:RadioButton ID="rbViewReturned" resourcekey="rbViewReturned.Text" 
    runat="server" GroupName="ViewRB" AutoPostBack="True"/>
<asp:RadioButton ID="rbViewUnReturned" resourcekey="rbViewUnReturned.Text" 
    runat="server" GroupName="ViewRB" AutoPostBack="True" />
